package com.cyclinggle.cloud;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

@RestController
public class TestContrller {
	
	@Autowired
	private RestTemplate restTemplate;
	
	@GetMapping("/add")
	public String add(Integer a, Integer b) {
		String res = restTemplate.getForObject("http://CLIENT-A/add?a=" + a + "&b=" + b, String.class);
		System.out.println(res);
		return res;
	}
	
}
